package com.lq.ecoldchain.ui.mine.carInfo.carline.add

import com.lq.ecoldchain.base.CommonLoadingViewModel
import com.lq.ecoldchain.ui.mine.carInfo.carline.CarLineDelegate
import com.lq.ecoldchain.ui.mine.carInfo.carline.CarLineViewModel
import org.kodein.di.Kodein
import org.kodein.di.android.support.AndroidLifecycleScope
import org.kodein.di.generic.bind
import org.kodein.di.generic.instance
import org.kodein.di.generic.scoped
import org.kodein.di.generic.singleton

/*
*2019/1/2 0002  20:38
*function by lq
*/
val addLineKodeinModule = Kodein.Module("Add_Car_Line_Kodein_Module"){
    bind<AddLineViewModel>() with scoped(AndroidLifecycleScope).singleton {
        AddLineViewModel()
    }

    bind<AddLineDelegate>() with scoped(AndroidLifecycleScope).singleton {
        AddLineDelegate(
                viewModel = instance()
        )
    }
}